<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>搜索结果</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/lapsed.css"/>
</head>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/iscroll.js"></script>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
<body onload="loaded()">
<div id="lapsed_box">
    <div class="wrap">
        <div class="main_list">
            @if(!isset($products) || count($products) == 0)

            <div class="main_empty" >
                <div class="lapsed_empty">
                    <div class="lapsed_img">
                        <img src="/img/00013.png" alt="" />
                    </div>
                </div>
                <p class="lapsed_wrods">还没有往期商品</p>
            </div>
            @else
            <!--循环开始-->
            @foreach($products as $k=>$v)
            <div class="lapsed">
                <div class="lapsed_icon">
                    <img src="/img/00004.png" alt="" />
                    <span>{{ $brandName[$v->brand] }}</span>
                </div>
                <div class="lapsed_bottom">
                    <div class="lapsed_pic">
                        @if($v->face)
                        <img src="{{ env('CDN_DOMAIN_NAME') }}/upload/{{$v->face}}" />
                            @else
                            <img src="{{ env('CDN_DOMAIN_NAME') }}/upload/default.png" />
                        @endif
                    </div>
                    <ul class="lapsed_info">
                        <li class="lapsed_li lapsed_name">{{ $v->title }}</li>
                        <li class="lapsed_li lapsed_date">发布时间：{{ $v->released_at }}</li>
                        <li class="lapsed_li lapsed_id">
                            <span class="id_left">款号：{{ $v->girard }}</span>
                            <span class="id_right">状态：
                                @if($v->status == 0)
                                    已下架
                                    @else
                                    销售中
                                @endif
                            </span>
                        </li>
                        <li class="lapsed_intro">商品简介：{{ $v->describe }}</li>
                    </ul>
                </div>
            </div>
            @endforeach
            @endif
            <!--循环结束-->
        </div>
    </div>
</div>
</body>
<script>
    /*滚动*/
    var myScroll;
    function loaded () {
        setTimeout(function(){
            myScroll = new IScroll('.wrap', {
                mouseWheel: true,
                click: true
            });
        },100);
    }
    document.addEventListener('touchmove', function (e) {e.preventDefault();},false);
</script>
</html>
